<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8" />
    <title></title>
    <style>
      @import url("static/css/googleapis.css");

      table,
      th,
      td {
        border: 1px solid black;
        border-collapse: collapse;
      }
    </style>
  </head>
  <body style="font-family: 'Roboto', sans-serif">
    <div style="width: 90%; margin: 20px auto">
      <section style="margin: 0 15px; color: #425b76">
        <p style="font-size: 15.5px">Dear {{user}},</p>
        <p style="font-size: 15.5px">
          Please be reminded that the following order is endorsed by {{endorser}}.
        </p>

        <table style="width: 100%; font-size: 15.5px">
          <tr>
            {% if isIGI %}
            <th>Inspection NO.</th>
            <th>PO NO.</th>
            {% else %}
            <th>Parent WO No./
              Line Work Order:
              </th>
            <th>CEWS Work Order(WO) NO.</th>
            {% endif %}
            <th>Mtce Type</th>
            <th>Stockcode</th>
            <th>Serial No</th>
            <th>Description</th>
            <th>Task</th>
          </tr>
          {% for rot_obj in rot_objs %}
          <tr>
            {% if isIGI %}
            <td style="text-align: center;  white-space: wrap; word-wrap: break-word; vertical-align: middle; max-width: 300px;">
              {{rot_obj.repair_order.inspection_no|default:''}}
            </td>
            <td style="text-align: center; vertical-align: middle">
              {{rot_obj.repair_order.po_no|default:''}}
            </td>
          
            {% else %}
            <td style="text-align: center;  white-space: wrap; word-wrap: break-word; vertical-align: middle; max-width: 300px;">
              {{rot_obj.repair_order.parent_work_order_no|default:''}}
            </td>
            <td style="text-align: center; vertical-align: middle">
              {{rot_obj.repair_order.work_order_no|default:''}}
            </td>
            {% endif %}

            <td style="text-align: center; vertical-align: middle">
              {{rot_obj.repair_order.mtce_type}}
            </td>
            <td style="text-align: center; vertical-align: middle">
              {{rot_obj.stock_code}}
            </td>
            <td style="text-align: center; vertical-align: middle">
              {{rot_obj.serial_no}}
            </td>
            <td style="text-align: center; vertical-align: middle">
              {{rot_obj.repair_order.eqpt_description}}
            </td>
            <td style="text-align: center; vertical-align: middle">
              {{rot_obj.task_name}}
            </td>
     
          </tr>
          {% endfor %}
        </table>

        <br />
        <p style="font-size: 15.5px">Thank you.</p>

        <p style="font-size: 15.5px">Best regards</p>
      </section>
    </div>
  </body>
</html>
